package com.qingcloud.base.remote.executor;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 运行中心接口参数
 *
 * @author wangjinnan
 */
public class JobRuntimeParam implements Serializable {

    /**
     * 批量控制组件实例参数对象
     */
    @Getter
    @Setter
    @ToString
    @Accessors(chain = true)
    @ApiModel("批量控制组件实例参数")
    public static class IdListParam {

        @ApiModelProperty(value = "实例ID数组", example = "[1,2]")
        private List<Integer> ids;

    }


    /**
     * 修改cron表达式对象
     */
    @Getter
    @Setter
    @ToString
    @ApiModel("修改cron表达式参数对象")
    public static class ModifyCron {

        @ApiModelProperty(value = "实例ID", example = "1")
        private Integer instanceId;

        @ApiModelProperty(value = "cron表达式", example = "0 1 * * * *")
        private String cron;

    }

    /**
     * 修改cron表达式参数对象
     */
    @Getter
    @Setter
    @ToString
    @ApiModel("批量修改cron表达式参数")
    public static class ModifyCronParam {

        @ApiModelProperty(value = "实例ID")
        private List<ModifyCron> cronList;

    }

}
